$(document).ready(function(){
    $(".i-checks").iCheck({
        checkboxClass:"icheckbox_square-green",
        radioClass:"iradio_square-green",
    });

    //判断内容是否为空
    $("#save").click(function(){
        var invite_L1 = $.trim($("input[name='invite_L1']").val());
        var invite_L2 = $.trim($("input[name='invite_L2']").val());
        var member_fee = $.trim($("input[name='member_fee']").val());
        if(invite_L1 == '' || invite_L2 == '' || member_fee == ''){
            layer.msg('请填写配置参数');
            return false;
        }

        //ajax异步提交数据
        $.ajax({
            url: GV.system_siteconfig,
            type:'post',
            data:{'invite_L1':invite_L1,'invite_L2':invite_L2, 'member_fee':member_fee},
            success:function(data){
                if(data.status == 1){
                    layer.msg(data.info);
                    setTimeout(function(){
                        location.href = data.url;
                    },1000);
                }else{
                    layer.msg(data.info);
                    location.href = data.url;
                }
            }
        });
    });
});